<template>
	<view class="container">
		<view class="list">
			<view class="item" v-for="item in useDataResult.dataList" @click="toUrl(`/pageUser/myActivity/detail?activityId=${item.activityId}`)">
				<image :src="item.activityImg"></image>
				<view class="item-content">
					<view class="item-title">{{item.activityName}}</view>
					<view class="item-time">{{item.createdAt}}</view>
				</view>
			</view>
		</view>
		<gzListNull :list="useDataResult.dataList"></gzListNull>
	</view>
</template>

<script setup>
	import { ref, reactive } from 'vue';
	import storageManage from '@/util/storageManage.js'
	import { $fansActivityList } from '@/http/apiManager.js';
	import useGetList from '@/hooks/useGetList.js'

	const { useDataResult, getList } = useGetList($fansActivityList, data => data, { }, true)
	
	/**
	 * 路由跳转
	 */
	const toUrl = (url) => {
		uni.navigateTo({
			url
		})
	}
</script>

<style lang="less">
	.container {
		width: 100%;
		min-height: 100vh;
		padding: 24rpx;
		box-sizing: border-box;
		background-color: #F7F8FB;
		overflow: hidden;

		.list {
			display: flex;
			flex-direction: column;
			gap: 24rpx;

			.item {
				background-color: #fff;
				padding: 24rpx;
				border-radius: 10rpx;
				display: flex;
				align-items: center;
				gap: 24rpx;

				image {
					width: 100rpx;
					height: 100rpx;
					border-radius: 50%;
				}

				.item-content {
					flex-grow: 1;

					.item-title {
						font-size: 30rpx;
						color: #333;
						font-weight: bold;
					}

					.item-time {
						font-size: 24rpx;
						color: #999;
						margin-top: 10rpx;
					}
				}
			}
		}
	}
</style>